<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			
			// 1. 定义变量
			var a = 123;
			console.log(typeof a);  // number
			a = "123"
			console.log(typeof a);
			
			// 2. 可以省略var
			b = 456
			console.log(b)
			
			
		</script>
		
		<script>
			console.log(a);
			
			
		</script>
	</body>
</html>
